package com.ptswitch.material.components;

import org.apache.tapestry5.BindingConstants;
import org.apache.tapestry5.annotations.InjectPage;
import org.apache.tapestry5.annotations.OnEvent;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.Property;

import com.ptswitch.material.pages.bom.SearchBom;

public class BomSearchForm {
    @Parameter(defaultPrefix = BindingConstants.LITERAL, value = "_self")
    @Property
    private String target;
    @Parameter
    @Property
    private String like;
    @InjectPage
    private SearchBom searchBom;

    @OnEvent
    Object search() {
        return searchBom.withInit(like, 50, 1);
    }
}
